import React from 'react'
import {TabNavigator, TabBarBottom, TabBarTop} from 'react-navigation'
import Stewart from '../components/Stewart'
import Mall from '../components/Mall'
import Options from '../components/Options'
import {Platform} from 'react-native'
import {Constants} from 'expo'
import {white, orange} from '../utils/colors'
import {FontAwesome, Ionicons} from '@expo/vector-icons'
import Store from '../store'
import {refreshList,loadLogo} from '../actions'
import { RootStack } from './index';


export const RootTap = TabNavigator({
    Home: {
        screen: Stewart,
        navigationOptions: {
            tabBarIcon: ({
                tintColor = orange
            }) => <Ionicons name='ios-home' size={30} color={tintColor}/>,
        }
    },
    Mall: {
        screen: Mall,
        navigationOptions: {
            tabBarIcon: ({
                tintColor = orange
            }) => <Ionicons name='ios-cart' size={30} color={tintColor}/>,
        }
    },
    Options: {
        screen: Options,
        navigationOptions: {
            tabBarIcon: ({
                tintColor = orange
            }) => <Ionicons name='ios-settings' size={30} color={tintColor}/>
        }
    }
}, {
    tabBarPosition: 'bottom',
    tabBarOptions: {
        activeTintColor: Platform.OS === 'ios'
            ? orange
            : white,
        style: {
            height: 56,
            backgroundColor: Platform.OS === 'ios'
                ? white
                : orange,
            shadowColor: 'rgba(0, 0, 0, 0.24)',
            shadowOffset: {
                width: 0,
                height: 3
            },
            shadowRadius: 6,
            shadowOpacity: 1
        }
    }
})

